package kr.hkit.framwordk.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class CloseDAOUtil {
	
	public static void close(Connection connection){
		try {
			connection.close();
		} catch (SQLException e) {
			System.err.println();
		}finally{
			connection = null;
		}
	}
	
	public static void close(PreparedStatement pstmt){
		try {
			pstmt.close();
		} catch (SQLException e) {
			System.err.println();
		}finally{
			pstmt = null;
		}
	}
	public static void close(ResultSet resultSet){
		try {
			resultSet.close();
		} catch (SQLException e) {
			System.err.println();
		}finally{
			resultSet = null;
		}
	}
	
	public static void close(ResultSet rs, PreparedStatement pstmt){
		close(rs);
		close(pstmt);
	}
}
